﻿Imports System
Imports System.Data
Imports System.Configuration
Imports System.Linq
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Xml.Linq
Imports System.Collections.Generic


Imports BBDD


Namespace Elementos
    _
   
   Public Class Usuario
      

      Private DNI As String = "vacio"
      Private nombre As String
      Private apellidos As String
      Private email As String
      Private direccion As String
      Private telefono As Integer
      Private localidad As String
      Private provincia As String
      Private pais As String
      Private CP As Integer
      Private saldo As Double
      Private CC_banco As String
      Private contrasena As String
      Private privilegios As Integer
      Private pendiente As Integer
      
      
      
      
      'Metodos contructores
      Public Sub New()
         Me.DNI = "vacio"
         Me.nombre = ""
      End Sub 'New
      
      Public Sub New(attrs() As String)
            Me.DNI = attrs(0)
            Me.nombre = attrs(1)
            Me.apellidos = attrs(2)
            Me.email = attrs(3)
            Me.direccion = attrs(4)
            Me.telefono = Long.Parse(attrs(5))
            Me.localidad = attrs(6)
            Me.provincia = attrs(7)
            Me.CP = Integer.Parse(attrs(8))
            Me.saldo = Double.Parse(attrs(9))
            Me.CC_banco = attrs(10)
            Me.contrasena = attrs(11)
            Me.privilegios = Integer.Parse(attrs(12))
            Me.pendiente = Integer.Parse(attrs(13))
            Me.pais = attrs(14)
      End Sub 'New
       
      
      'Funciones
      Public Function getDNI() As String
         Return DNI
      End Function 'getDNI
      
      
      Public Function getnombre() As String
         Return Me.nombre
      End Function 'getnombre
      
      Public Function getapellidos() As String
         Return Me.apellidos
      End Function 'getapellidos
      
      
      Public Function getemail() As String
         Return Me.email
      End Function 'getemail
      
      Public Sub setemail(email As String)
         Me.email = email
      End Sub 'setemail
      
      
      Public Function getdireccion() As String
         Return Me.direccion
      End Function 'getdireccion
      
      Public Sub setdireccion(direccion As String)
         Me.direccion = direccion
      End Sub 'setdireccion
      
      
      Public Function gettelefono() As Long
         Return Me.telefono
      End Function 'gettelefono
      
      Public Sub settelefono(telefono As Integer)
         Me.telefono = telefono
      End Sub 'settelefono
      
      
      Public Function getlocalidad() As String
         Return Me.localidad
      End Function 'getlocalidad
      
      Public Sub setlocalidad(localidad As String)
         Me.localidad = localidad
      End Sub 'setlocalidad
      
      
      Public Function getprovincia() As String
         Return Me.provincia
      End Function 'getprovincia
      
      Public Sub setprovincia(provincia As String)
         Me.provincia = provincia
      End Sub 'setprovincia
      
      
      Public Function getpais() As String
         Return Me.pais
      End Function 'getpais
      
      Public Sub setpais(pais As String)
         Me.pais = pais
      End Sub 'setpais
      
      
      Public Function getCP() As Integer
         Return Me.CP
      End Function 'getCP
      
      Public Sub setCP(CP As Integer)
         Me.CP = CP
      End Sub 'setCP
      
      
      Public Function getsaldo() As Double
         Return Me.saldo
      End Function 'getsaldo
      
      Public Sub setsaldo(saldo As Double)
         Me.saldo = saldo
      End Sub 'setsaldo
       
      
      Public Function getCCBanco() As String
         Return Me.CC_banco
      End Function 'getCCBanco
      
      Public Sub setCCBanco(cc As String)
         Me.CC_banco = cc
      End Sub 'setCCBanco
      
      
      Public Function getPass() As String
         Return Me.contrasena
      End Function 'getPass
      
      Public Sub setPass(pass As String)
         Me.contrasena = pass
      End Sub 'setPass
      
      
      
      Public Function getprivilegios() As Integer
         Return Me.privilegios
      End Function 'getprivilegios
      
      
      Public Function getpendiente() As Integer
         Return Me.pendiente
      End Function 'getpendiente
      
      Public Sub setpendiente(pendiente As Integer)
         Me.pendiente = pendiente
      End Sub 'setpendiente
   End Class 'Usuario
End Namespace 'Elementos

